/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.ap.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import javax.validation.constraints.NotNull;

import com.jeeplus.core.persistence.TreeEntity;

/**
 * 科目Entity
 * @author 李超辉
 * @version 2017-12-22
 */
public class Subject extends TreeEntity<Subject> {
	
	private static final long serialVersionUID = 1L;
	private String type;		// 科目级别
	
	
	public Subject() {
		super();
	}

	public Subject(String id){
		super(id);
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public  Subject getParent() {
			return parent;
	}
	
	@Override
	public void setParent(Subject parent) {
		this.parent = parent;
		
	}
	
	public String getParentId() {
		return parent != null && parent.getId() != null ? parent.getId() : "0";
	}
}